package com.atguigu.practice;

public class isPower {
    public static boolean isTwoPower(int n){
        return ((n&(n-1))==0);
    }
    public static boolean isFourPower(int n){
        return (n&(n-1))==0 && (n&0x55555555)!=0;
    }
}
